}
static void
-gtk_video_motion (GtkEventControllerMotion *motion,
- double x,
- double y,
- GtkVideo *self)
+gtk_video_reveal_controls (GtkVideo *self)
{
gtk_revealer_set_reveal_child (GTK_REVEALER (self->controls_revealer), TRUE);
if (self->controls_hide_source)
self);
}
+static void
+gtk_video_motion (GtkEventControllerMotion *motion,
+ double x,
+ double y,
+ GtkVideo *self)
+{
+ gtk_video_reveal_controls (self);
+}
+
+static void
+gtk_video_pressed (GtkVideo *self)
+{
+ gtk_video_reveal_controls (self);
+}
+
static void
gtk_video_realize (GtkWidget *widget)
{
gtk_widget_class_bind_template_child (widget_class, GtkVideo, controls);
gtk_widget_class_bind_template_child (widget_class, GtkVideo, controls_revealer);
gtk_widget_class_bind_template_callback (widget_class, gtk_video_motion);
+ gtk_widget_class_bind_template_callback (widget_class, gtk_video_pressed);
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
gtk_widget_class_set_css_name (widget_class, I_("video"));
<signal name="motion" handler="gtk_video_motion" swapped="no"/>
</object>
</child>
+ <child>
+ <object class="GtkGestureClick">
+ <property name="touch-only">1</property>
+ <signal name="pressed" handler="gtk_video_pressed" swapped="yes"/>
+ </object>
+ </child>
</template>
</interface>